package com.zhentao.pojo;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.util.Date;

/**
 * 
 * @TableName t_register
 */
@TableName(value ="t_register")
@Data
public class TRegister {
    /**
     * 
     */
    @TableId
    private Integer gid;

    /**
     * 患者外键
     */
    private Integer uid;

    /**
     * 患者名字
     */
    private String username;

    /**
     * 就诊卡号
     */
    private String number;

    /**
     * 身份证号
     */
    private String idNumber;

    /**
     * 手机号
     */
    private String phone;

    /**
     * 科室
     */
    private Integer deptId;

    /**
     * 科室类型
     */
    private String type;

    /**
     * 挂号费
     */
    private Integer cost;

    /**
     * 挂号状态
     */
    private Integer status;

    /**
     * 就诊日期
     */
    private Date byData;

    /**
     * 就诊时间
     */
    private Date byTime;

    /**
     * 预约时间
     */
    private Date yyTime;

    /**
     * 医院名称
     */
    private String hospitalname;

    /**
     * 医院地址
     */
    private String hospitaladdress;

    /**
     * 医生编号
     */
    private Integer doctorId;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TRegister other = (TRegister) that;
        return (this.getGid() == null ? other.getGid() == null : this.getGid().equals(other.getGid()))
            && (this.getUid() == null ? other.getUid() == null : this.getUid().equals(other.getUid()))
            && (this.getUsername() == null ? other.getUsername() == null : this.getUsername().equals(other.getUsername()))
            && (this.getNumber() == null ? other.getNumber() == null : this.getNumber().equals(other.getNumber()))
            && (this.getIdNumber() == null ? other.getIdNumber() == null : this.getIdNumber().equals(other.getIdNumber()))
            && (this.getPhone() == null ? other.getPhone() == null : this.getPhone().equals(other.getPhone()))
            && (this.getDeptId() == null ? other.getDeptId() == null : this.getDeptId().equals(other.getDeptId()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
            && (this.getCost() == null ? other.getCost() == null : this.getCost().equals(other.getCost()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getByData() == null ? other.getByData() == null : this.getByData().equals(other.getByData()))
            && (this.getByTime() == null ? other.getByTime() == null : this.getByTime().equals(other.getByTime()))
            && (this.getYyTime() == null ? other.getYyTime() == null : this.getYyTime().equals(other.getYyTime()))
            && (this.getHospitalname() == null ? other.getHospitalname() == null : this.getHospitalname().equals(other.getHospitalname()))
            && (this.getHospitaladdress() == null ? other.getHospitaladdress() == null : this.getHospitaladdress().equals(other.getHospitaladdress()))
            && (this.getDoctorId() == null ? other.getDoctorId() == null : this.getDoctorId().equals(other.getDoctorId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getGid() == null) ? 0 : getGid().hashCode());
        result = prime * result + ((getUid() == null) ? 0 : getUid().hashCode());
        result = prime * result + ((getUsername() == null) ? 0 : getUsername().hashCode());
        result = prime * result + ((getNumber() == null) ? 0 : getNumber().hashCode());
        result = prime * result + ((getIdNumber() == null) ? 0 : getIdNumber().hashCode());
        result = prime * result + ((getPhone() == null) ? 0 : getPhone().hashCode());
        result = prime * result + ((getDeptId() == null) ? 0 : getDeptId().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getCost() == null) ? 0 : getCost().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getByData() == null) ? 0 : getByData().hashCode());
        result = prime * result + ((getByTime() == null) ? 0 : getByTime().hashCode());
        result = prime * result + ((getYyTime() == null) ? 0 : getYyTime().hashCode());
        result = prime * result + ((getHospitalname() == null) ? 0 : getHospitalname().hashCode());
        result = prime * result + ((getHospitaladdress() == null) ? 0 : getHospitaladdress().hashCode());
        result = prime * result + ((getDoctorId() == null) ? 0 : getDoctorId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", gid=").append(gid);
        sb.append(", uid=").append(uid);
        sb.append(", username=").append(username);
        sb.append(", number=").append(number);
        sb.append(", idNumber=").append(idNumber);
        sb.append(", phone=").append(phone);
        sb.append(", deptId=").append(deptId);
        sb.append(", type=").append(type);
        sb.append(", cost=").append(cost);
        sb.append(", status=").append(status);
        sb.append(", byData=").append(byData);
        sb.append(", byTime=").append(byTime);
        sb.append(", yyTime=").append(yyTime);
        sb.append(", hospitalname=").append(hospitalname);
        sb.append(", hospitaladdress=").append(hospitaladdress);
        sb.append(", doctorId=").append(doctorId);
        sb.append("]");
        return sb.toString();
    }
}